<template>
  <div class='container-com-a'>
    A组件：接收B传值：{{msg}}
  </div>
</template>

<script>
import eventBus from '@/eventBus'
export default {
  data () {
    return {
      msg: ''
    }
  },
  created () {
    // 接收触发b2a事件的传值
    eventBus.$on('b2a', (data) => {
      this.msg = data
    })
  }
}
</script>

<style scoped lang='less'></style>
